package com.panshi.qa.provider.modules.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panshi.qa.api.vo.ItemQueryVo;
import com.panshi.qa.provider.modules.domain.QaQuesitonRelevance;
import com.panshi.qa.provider.modules.domain.QaQuestionUncheck;
import com.panshi.qa.provider.modules.domain.QaQuestionUncheckSystem;
import com.panshi.qa.provider.modules.domain.ThType;
import com.panshi.qa.provider.modules.mapper.QaQuestionUncheckSystemMapper;
import com.panshi.qa.provider.modules.service.QaQuestionUncheckSystemService;
import com.panshi.qa.provider.modules.service.ThTypeService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class QaQuestionUncheckSystemServiceImpl extends ServiceImpl<QaQuestionUncheckSystemMapper, QaQuestionUncheckSystem> implements QaQuestionUncheckSystemService {
    @Autowired
    private ThTypeService thTypeService;



    //查询未审核列表返回给后台
    @Override
    public Map<String,Object> queryQuestionUncheckSystem(ItemQueryVo itemQueryVo) {

        //返回查询数据
        List<QaQuesitonRelevance> list = this.baseMapper.findQaQuestionUncheckSystemList(itemQueryVo);
        //返回查询数据的总记录数
        Integer total = this.baseMapper.findQaQuestionUncheckSystemListTotal();

        Map<String,Object> map = new HashMap<>();
        map.put("code",0);
        map.put("msg","success");
        map.put("count",total);
        map.put("data",list);

        System.out.println("未              审核列表数据        "+map.get("data"));
        return map;
    }
}
